﻿
#include <QThreadPool>
#include <QDesktopServices>
#include <QFont>
#include <QUrl>

#include "Application.h"

int main(int argc, char *argv[])
{
	// 配置线程池
	QThreadPool::globalInstance()->setMaxThreadCount(50);

	Core::Application app(argc, argv);
	if (!app.initInstance())
	{
		return 0;
	}

	QFont font("Microsoft YaHei", 10);
	app.setFont(font);

	int ret = app.exec();
	app.exitInstance();

	if (ret == 777)
	{
		QDesktopServices::openUrl(QUrl::fromLocalFile(QCoreApplication::applicationFilePath()));
	}

	return ret;
}
